perm filename MET17.LSP[TIM,LSP] blob sn#715204 filedate 1983-06-14 generic text, type C, neo UTF8
COMMENT āŠ—   VALID 00002 PAGES
C REC  PAGE   DESCRIPTION
C00001 00001
C00002 00002	 Benchmark to print to the terminal
C00004 ENDMK
CāŠ—;
;;; Benchmark to print to the terminal
(declare 
 (fasload meter)
 (load "metint.lsp")
 (setq meter:count-only T))
(declare 
 (setq local-objects-of-interest 
       '((subst "Substs"))))
;;; The Maclisp Code


(declare (fixsw t))

(meter:meter tprint
 (meter-funs #.(all-objs)
(defun init (m n atoms)
 (mn "INIT" init)
       (let ((atoms (subst () () atoms)))
	    (do ((a atoms (cdr a)))
		((null (cdr a)) (rplacd a atoms)))
	    (init1 m n atoms)))

(defun init1 (m n atoms)
 (mn "INIT1" init1)
       (cond ((= m 0) (pop atoms))
	     (t (do ((i n (- i 2))
		     (a ()))
		    ((< i 1) a)
		    (mn "Cars" car)(mn "Cdrs" cdr)
		    (push (pop atoms) a)
		    (push (init1 (1- m) n atoms) a)))))))

(declare (special test-atoms))

(setq test-atoms '(abc1 cde2 efg3 ghi4 ijk5 klm6 mno7 opq8 qrs9
			stu0 uvw1 wxy2 xyz3 123a 234b 345c 456d 
			567d 678e 789f 890g))